﻿using MiniFox.Infrastructure;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;

namespace DMC.Core.Models.Dto
{
    public class ConnectionDto
    {
        [Key]
        [Display(Name = "名称", ShortName = "名称")]
        [JsonProperty("name")]
        [Required(ErrorMessage = "连接名必须填写")]
        public string Name { get; set; }
        [Display(Name = "连接字符串", ShortName = "连接字符串")]
        [Required(ErrorMessage = "连接字符串必须填写")]
        [JsonProperty("connectionString")]
        public string ConnectionString { get; set; }
        [Display(Name = "数据库提供者", ShortName = "数据库提供者")]
        [Required(ErrorMessage = "数据库提供者")]
        [JsonProperty("provider")]
        public string Provider { get; set; }
    }
}
